package org.example.components;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

@Component
public class LenovoComputer implements Computer {
    private final Displayer displayer;
    private final Printer printer;

    @Autowired
    public LenovoComputer(@Qualifier("dellDisplayer") Displayer displayer,@Qualifier("epsonPrinter") Printer printer) {
        this.displayer = displayer;
        this.printer = printer;
    }

    @Override
    public void displayInfo() {
        System.out.println("Lenovo Computer is running with: ");
        displayer.show();
        printer.print();
    }
}
